package cn.wowjoy.pda.android_pharmacy.api;

import cn.wowjoy.pda.android_pharmacy.model.xml.XmlData;
import cn.wowjoy.pda.android_pharmacy.model.xmlBaseRequest.RoleInfoRequestEnvelope;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import cn.wowjoy.pda.android_pharmacy.model.xmlBaseResponse.*;

public interface ApiService {
    String BASE_URL = "http://10.31.96.106:9000/";



//    //登录只返回药房所有员工的
//    @Headers({"Content-Type: text/xml;charset=utf-8",
//            "SOAPAction: http://tempuri.org/Etrack_ProcInterface"})
//    @POST("EtrackInterface.asmx")
//    Observable<RoleInfoResponseEnvelope> queryEmployees(@Body RoleInfoRequestEnvelope requestEnvelope);


   @Headers({"Content-Type: text/xml;charset=utf-8",
           "SOAPAction: http://tempuri.org/Etrack_ProcInterface"})
   @POST("EtrackInterface.asmx")
   Observable<RoleInfoResponseEnvelope> doXml(@Body RoleInfoRequestEnvelope requestEnvelope);



    @FormUrlEncoded
    @POST("http://192.168.0.48:9091/WebService/MEMRWebService.asmx/Login")
    Observable<XmlData> login(@Field("gh") String username, @Field("password") String password);
}
